package com.videoplat.util;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;
import org.apache.struts2.interceptor.ParameterAware;

import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.Preparable;

/**
 * 
 * @author wangyan
 *
 */
public abstract class AbsBaseAction extends ActionSupport implements Preparable, ParameterAware {

	 /**
     * 
     */
    private static final long serialVersionUID = -7227503014454650515L;

    public abstract String init() throws Exception;
	private HttpServletRequest request;
	private HttpServletResponse response;

	/**
	 * @return the request
	 */
	public HttpServletRequest getRequest() {
		request = ServletActionContext.getRequest();
		return request;
	}
	/**
	 * @return the response
	 */
	public HttpServletResponse getResponse() {
		response = ServletActionContext.getResponse();
		return response;
	}
	
	public void setParameters(Map<String, String[]>  parameters) {
		// TODO Auto-generated method stub
		parameters.remove("pager.offset");
	}
	
}
